#include"shm.hpp"
#include"fifo.hpp"

int main()
{
    Shm shm(pathname,progid,USER);

    FileOper writerfile(PATH,FILENAME);
    writerfile.OpenForWrite();

    char *mem = (char *)shm.VirtualAddr();
    int pos=0;
    for(char c='A';c<='J';c++,pos+=2)
    {   
        mem[pos]=c;
        mem[pos+1]=c;
        mem[pos+2]=0;
        writerfile.WakeUp();
        sleep(1);
    }

    writerfile.Close();
    return 0;
}